<script setup>
import { useUserStore } from '@/stores'

import { userreviewinfoGetService } from '@/api/user/review'
import { ref } from 'vue'
import { InfoFilled } from '@element-plus/icons-vue'
const userinfo = ref({
  id: '',
  tar: ''
})
const userreviewinfoview = ref([])
const getreviewInfoList = async () => {
  userinfo.value.tar = '1'
  userinfo.value.id = `${useUserStore().user.id}`
  const res = await userreviewinfoGetService(userinfo.value)
  //landparcelinfo.value = res.data.data
  userreviewinfoview.value = res.data.data
}
getreviewInfoList()
</script>

<template>
  <PageContainer>
    <el-collapse>
      <el-empty v-if="!userreviewinfoview" description="暂无数据" />
      <el-collapse-item
        v-for="(record, index) in userreviewinfoview"
        :name="index"
        :key="index"
      >
        <template #title>
          <div class="custom-title">
            {{ record.landresname
            }}<el-icon class="header-icon">
              <info-filled />
            </el-icon>
          </div>
        </template>
        <div>
          <p class="status">土地资源名称：</p>
          <p class="comments">{{ record.landresname }}</p>

          <p class="status">土地资源地址：</p>
          <p class="comments">{{ record.address }}</p>
          <p class="status">土地块数：</p>
          <p class="comments">{{ record.parcelcount }}</p>
          <p class="status">状态：</p>
          <p class="comments">{{ record.status }}</p>
          <p class="status">审核意见：</p>
          <p class="comments">{{ record.comments }}</p>
        </div>
      </el-collapse-item>
    </el-collapse>
  </PageContainer>
</template>
<style scoped>
.custom-title {
  font-weight: bold;
  color: #4caf50; /* 绿色 */
  cursor: pointer; /* 添加手型指针，提醒用户可以点击 */
  font-size: 24px;
}
/* 添加醒目样式 */
.status {
  font-weight: bold;
  color: #0b0c0c; /* 蓝色 */
  font-size: 20px;
}

.comments {
  font-style: italic;
  color: #dc3545; /* 红色 */
  font-size: 20px;
}
</style>
